package cn.xiongxf.service.impl;

import cn.xiongxf.domain.UserAccount;
import cn.xiongxf.mapper.UserAccountMapper;
import cn.xiongxf.service.IUserAccountService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiongxiaofu
 * @since 2022-08-12
 */
@Service
public class UserAccountServiceImpl extends ServiceImpl<UserAccountMapper, UserAccount> implements IUserAccountService {

    @Override
    public void save(Long id) {
        UserAccount userAccount = new UserAccount();
        userAccount.setId(id);
        userAccount.setUsableAmount(new BigDecimal(0));
        userAccount.setFrozenAmount(new BigDecimal(0));
        userAccount.setCreateTime(System.currentTimeMillis());
        insert(userAccount);
    }
}
